# -*- coding: utf-8 -*-
# @Time : 2022-06-01 10:33
# @Author : Z
# @Function :


# a = map(lambda x: x ** 3, [1, 2, 3])
# list(a)

# str = ["a", "ab", "abc", "abcd"]
# discts = {}
# for i in range(len(str)):
#     discts[i] = str[i]
# print(discts)


# def w1():
#     print("正在装饰")
#
#     def inner():
#         print("正在验证授权")
#
#     return inner()
#
#
# w1()

# strs = " i like python "
# one = strs.split(" ")
# two = strs.strip()
# print(one)
# print(two)

# lis = ["apple", "lemon", "pear", "peach"]


# def fn(x):
#     return x[::-1]


# lis.sort(key=fn, reverse=True)
# print(lis)

# for i in range(5):
#     i += 1
#     print("------------")
#     if i == 3:
# continue 跳出本句的循环，但循环仍在继续。故 i = 3 时不进行打印
#         continue
#     print(i)


# def fun(a,*,b):
#
#     print(b)
#
# fun(1,2,3,4)


# nums =set([1,2,2,3,3,4])
# print(nums)
# print(len(nums))

# 转义，r标识 \ 为普通字符
# print(r"\nowow")


# a = [1,2,3,1,2,4,6]

# b = list(set(a))
# print(b)

# c = {}
# c = list(c.fromkeys(a))
# print(c)

n = 1000
count = 0
while n > 1:
    print(n)
    n = n / 2
    count += 1
print(count)

a = "hello python"
b ="python"
print(a.endswith(b,2))

